<template>
  <div>
    <ClTable
      ref="refTable"
      show-index
      :highlight="true"
      :max-height="500"
      :table-data="projectInfoList"
      :column-list="columnList"
      :filter-form-item="filterList"
      @row-click="handleSelectionChange"
    />
  </div>
</template>

<script setup lang="ts">
import { COLUMN_LIST_PROJECT, FILTER_FORM_ITEM_PROJECT } from '../data'
import { projectInfoList } from '@/api/project-info'
const filterList = ref(cloneDeep(FILTER_FORM_ITEM_PROJECT))
const columnList = ref(COLUMN_LIST_PROJECT)
const currentId = ref(-0)
const handleSelectionChange = (val: any) => {
  currentId.value = val.id
}
defineExpose({
  currentId
})
</script>

<style scoped>
@import url('@/components/cl-table/index.scss');
</style>
